home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 801 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: stern.fokus.gmd.de!news
  2. From: Watson <sayegh@fokus.gmd.de>
  3. Newsgroups: comp.lang.c,comp.unix.programmer,comp.databases
  4. Subject: Re: Aligning struct fields with NDBM (was: Casting unsigned short ...)
  5. Date: Tue, 09 Jan 1996 13:40:56 +0100
  6. Organization: GMD FOKUS - Research Institute for Open Communication Systems
  7. Message-ID: <30F26258.4624@fokus.gmd.de>
  8. References: <simmons.820857453@rzdspc1> <simmons.821116795@rzdspc1> <821142071snz@genesis.demon.co.uk> <simmons.821184377@rzdspc1>
  9. NNTP-Posting-Host: pollux.fokus.gmd.de
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b4 (X11; I; SunOS 5.4 sun4m)
  14.  
  15. Geoffrey Simmons wrote:
  16.  
  17. > While I'm here, do you know of a good way to use the debugger to get at the
  18. > bottom of a problem like this (alignment errors, and possibly memory leaks)?
  19. > I struggled with this mainly because the debugger (GNU GDB 4.15.1) could
  20. > do everything that the running program couldn't do, so Usenet became my
  21. > only hope.
  22.  
  23. You may try the gcc compiler option -Wcast-align (if you're
  24. using gcc). This displayed message is something like 
  25.  
  26. 'casting causes alignment increase'
  27.  
  28. or something like that.
  29. -- 
  30. *    Greetinx,
  31.     Watson (sayegh@fokus.gmd.de)
  32.     more personal details at:
  33.     http://www.fokus.gmd.de/ovma/employees/sayegh/entry.html
  34.